Check for exceptions first in draw.py

- That way we might be checking the if conditions more often but we can
avoid problems with RDKit and carbon monoxide with triple bond (C#O)
because of changing valency of the oxygen atom.