Add helper function to check for capabilities.