Fixed applyAttributesIfNotNull to work properly with attributes with no value

When iterating through the array if the a value is not assigned to a key then it interprets that key as a value instead and gives it a numeric key so I'm checking to see if the key is numeric or not.