Fix TypeError with param type

using || operation with "" || undefined returns undefined. Should add an additional || to end the expression with a "" to protect against the value becoming undefined and breaking the .toLowerCase() call on line 79