Reintroduce exception if null is set as id