how about calling instanceof?