FORGE-947: Fixed possible NPE