To verify if the modular inverse of a modulo m exists, you need to check if a and m are coprime. To this end:
List all factors (divisors) of a.
List all factors (divisors) of m.
Check if the only common factor is 1.
Read more