isInstanceOf necessary because of type erasure