Fix php notice when body is no object