Corrected is object check on line 103