Check value type of extended class instance

I have BaseClass and MyClass : BaseClass.

Using val is BaseClass will return true for any object that is, or extends BaseClass.
How can I check if the object is of type MyClass, and not BaseClass?
Was this page helpful?