adding some defensive coding before attempting to get a term url