fixed null check with NPE protection (https://github.com/restlet/apispark/issues/1328)