Don't try to serialize if there's nothing to serialize

Signed-off-by: Shea Levy <shea@shealevy.com>