<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _as_list(obj):
 """Ensure an object is a list."""

    if obj is None:
        return None
    elif isinstance(obj, string_types):
        return [obj]
    elif isinstance(obj, tuple):
        return list(obj)
    elif not hasattr(obj, '__len__'):
        return [obj]
    else:
        return obj