Added null checks to persistence create/update