First pass at more complete istype implementation.