You need to compare like items that have numerical values.
int, float, time, date, datetime, etc., all have numerical values.
Strings, on the other hand, do not.
If you wish to compare two times then they must both be cast to TIME.
Rephrasing:
You cannot compare cast(outtime as time) and '18:16'
Do this:
cast(outtime as time) > cast('18:16' as time)