Converts a javascript object of unknown type to a boolean value.