Temporary fix for npm

Temporary remedy for #1302, until `npm` fixes the issue.
Right, let's keep the null check here. Other than that, looks good.