Improve content type detector tests and logic