def check_args(args):
    """
    Validates command-line arguments passed in to the script:
    * Ensures the --type argument is one of csv or json.
    * Ensures the port to listen on is between 1024 and 65535.

    Arguments:
        * args: The args namespace produced by ```parse_args```

    Returns True if checks pass, False otherwise.
    """
    errors = 0

    if(args.type not in ['csv', 'json']):
        errors += 1
        print("Please specify your file type with --type as csv or json.")
    
    if(int(args.port) <= 1023 or int(args.port) > 65535):
        errors += 1
        print("Please specify an integer port between 1024 and 65535.")

    if errors == 0:
        return True
    return False