prefer `is_a?` instead of `kind_of?` since we seem to use `is_a?` more in the code.