Don't blow up on type checking empty buffers

Closes #462.