reduced arguments checks, typeof doesn't require strict checking, tweaked a comment