extract method: logging for possible NPE later