more logging.
param inside (), guard against null.