Fixed error with unexpected return when putting an incorrect id for than...

Terminal was printing "Error: Unexpected return.  View stack trace with --trace" before because it was returning early.  Wrapped everything inside an "unless" to fix that.