Check if api method exists before calling on server