def check_args(args):
    """
    Ensures that the input RA is between 0. and 360., and the DEC is between
        -90 and 90.

    :param args: The command-line arguments.

    :type args: argparse.ArgumentParser Namespace

    :returns: argparse.ArgumentParser Namespace -- The command-line arguments.
        Included for function usage consistency.
    """
    if not (0.0 <= args.rarange[0] <= 360.0 and 0.0 <= args.rarange[1] <= 
        360.0 and args.rarange[0] < args.rarange[1]) or not (-90.0 <= args.
        decrange[0] <= 90.0 and -90.0 <= args.decrange[1] <= 90.0 and args.
        decrange[0] < args.decrange[1]):
        raise SystemExit('Invalid RA or Dec ranges.')
    if not args.exprange[0] < args.exprange[1]:
        raise SystemExit('Invalid exposure range: {r}'.format(r=args.exprange))
    return args
