It seems like you are loosely comparing $version of type null|string against null; this is ambiguous if the string can be empty. Consider using a strict comparison === instead.
It seems like you are loosely comparing $version of type null|string against null; this is ambiguous if the string can be empty. Consider using a strict comparison === instead.