Check if a key exists in attributes in Model::assign + refactoring