check_numeric function

Check input numeric arguments for class and length.