Defensive programming for null user and null DB items