Replaced filterIsInstance with class-literal argument with simplified version