Returns True if provided directory exists and is a directory, or False otherwise.

def is_valid_dir(path):
    ''' Returns True if provided directory exists and is a directory, or False otherwise. '''
    return os.path.exists(path) and os.path.isdir(path)