Add defined/null checker to utilities