added check null cases for persistence
merge