fix uncaught exception for trying to get profile variables

Simply wraps JSON.parse in try/catch