type check for arguments