Ensure null actual does not cause NullPointerException