Code Review changes: Changed to proper use of truthy and hasType. Function can now also test for Regex values in attributes.
Changed attributesHash to attributesObject, as proper naming convention
Fixed the order of the arguments in assertive calls, made unit-test to test for regex vals as well