Null checks on declare resources