only serialize photo if there is one