Refactored inline-if into more readable multi-line statement.