Remove some redundant checks

I would love to have another pair of eyes here, especially for Socket.IO.