Fix: Correctly cast Object to Boolean.