Set default invalid/unset line to -1, to reduce confusion with 0 being interpreted as the first line.
Return null if a variable was not found, instead of causing a NullPointerException.