Improve unit validation.