Get squiggles and coderush express and all those errors will be known to you at compile time.