Remove isMouse() and replace it with more precise has*() functions