Ensure we won't try to access a property of an undefined object