def get_wind_direction(degrees):
    """
    Return the shorthand direction based on the given degrees.
    :type degrees: str, float
    :param degrees: integer for degrees of wind
    :type: str
    :return: wind direction in shorthand form
    """
    try:
        degrees = int(degrees)
    except ValueError:
        return ''
    direction = ''
    if degrees < 23 or degrees >= 338:
        direction = 'N'
    elif degrees < 68:
        direction = 'NE'
    elif degrees < 113:
        direction = 'E'
    elif degrees < 158:
        direction = 'SE'
    elif degrees < 203:
        direction = 'S'
    elif degrees < 248:
        direction = 'SW'
    elif degrees < 293:
        direction = 'W'
    elif degrees < 338:
        direction = 'NW'
    return direction