Try to coerce an object into a Response object.

def make_response(obj):
    """Try to coerce an object into a Response object."""
    if obj is None:
        raise TypeError("Handler return value cannot be None.")
    if isinstance(obj, Response):
        return obj
    return Response(200, body=obj)