Topological properties of Mo2C and W2C superconductors