Fix to handle booleans

Boolean types weren't being handled properly.  If the value is false, it is not set into the object.  I added a new if statement that checks if the type is boolean and is not null and is not 'undefined'.