AUI-1644 Check for value before calling one

Ticket: [AUI-1644](https://issues.liferay.com/browse/AUI-1644)