Try to access mysql attribute gracefully.