Dangerous checking for booleans in angular when passing objects.