FORGE-1279: Added null check to avoid possible NPE