Well, I guess you could technically see if any "non-alphanumeric or %" characters. If they do exist, then you dont' need to urldeocde. If you find a %XX group (where XX is hexadecimal), then chances are it's urlencoded.
Unfortunately, there isn't a "is_urlencoded" function out there 🙁 Sorry.