Add how to list priority names and check if is valid

Documentation for some cases that I found myself looking at the code to find out how to do it.