npe in log statement