Fix for empty primary keys in create method

The create method will check if the primary key is set, but will not check whether it is empty. The ORM should not allow empty primary keys. I have added a check against empty primary key.