Added logic check for numeric arguments and number of arguments.