LPS-32861 Apply
LPS-27530 Return portletPreferences instead of null