fixed bug in families create and added uniqueness validation on family code