def METHOD_NAME(value):
    if not value.strip():
        return "{}"
    try:
        converted_value = json.loads(value)
        success = isinstance(converted_value, dict)
    except json.JSONDecodeError as exc:
        print(exc)
        success = False
    if not success:
        raise BadRequestException(
            "Environment's can't be parsed as json object"
        )
    return value