Created argument-checker function