Prevent failure on null objects such as arrays