Fix method that was using isInstance incorrectly