more efficient way to check for Extensions class