guard against npe