Fix a conditional to handle the null case

Not passing an options hash into sort_link caused it to fail
to look up the link title.

This is because `!args.first.try(:is_a?, Hash)` would return true
if the length of args was 0.

I've simplified the logic to just test if the next parameter in args
is a String (rather than test if it's not a Hash).
No need for array here
Conditions constant only used once, so not needed.
Use constants instead of string keys.

At least until we are all using the upcoming Ruby 2.2 which
will make this unnecessary.