Guard against NPE.