A comparison between the soft X-ray and [O III] morphologies of active galactic nuclei