Added AvailabilityGuard#checkAvailability

to use instead of checking isAvailable() and, if not, throw an exception
essentially saying the same thing but with different exception classes.
Merge pull request #2890 from tinwelint/2.2-check-availability

Added AvailabilityGuard#checkAvailability