check if this.managementServerProperties.getSecurity() is not null befor...

...e checking isEnabled()

 fixes gh-2003