should add a null check to avoid NPE on next line