Added validation of uniqueness and presence.