Added NPE guard