Better contentType detection