Fixes #2051: Do not save null data into database when using RBAC