When writing generic JavaScript functions (which we do as much as possible), you need to account for developers of all levels of experience using your generic function. This means preventing errors from happening if the developer sends in something unexpected as a parameter. The most recent example of this is working with an array as a parameter. That led us to wonder how to check a variable to kn

