LPS-45492 Add check to SourceFormatter