Added validation to mapping