Add check for notnull property of database