Try/Catch IllegalStateException

Added try/catch blocks around potential IllegalState offenders