<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def upper_lower_none(arg):
 """Validate arg value as "upper", "lower", or None."""

    if not arg:
        return arg

    arg = arg.strip().lower()
    if arg in ['upper', 'lower']:
        return arg

    raise ValueError('argument must be "upper", "lower" or None')