misc cleanup, converted all typeof calls to _.is* calls