Added checking for theorems