Fix entity saving when '' is used as a primary key value.

Having '' as the primary key value is almost never wanted as '' is cast to null or 0. Instead filter out this value and treat it as a mistake.

Refs #4152