#896: Fixed safeNull to check for boolean type so false booleans is returned correctly.