Check for empty id

To distinguish between create and update