Implementing isAvailable function.