I would use ``null !==`` instead of casting the object top boolean.