avoiding NPE when input param is null