A bit more elegant dictionary test