Guard against content being None

`content` can be passed in as None, so we need to set it to the empty
list if that occurs.

This also fixes the bad-practice of using a mutable data-type as a
default argument.

Fixes bug 1163598

Change-Id: Ie991c9452a21cfb036d3955a094ec345805d63d1
(cherry picked from commit 782bab8dd2930a4479d84dcb906321313d06b25b)
Merge "Guard against content being None" into stable/grizzly