Optional policy

When setting up compliance rules, policies, and reports, is there a way to have a rule that only shows non-compliance if f the first line is present and the second line is missing, then if the first line is missing then don't count it as a violation?

Some of our network devices have an option set of lines in the configuration. For example, if the configuration has these lines, then only some of them have the "line vty 2 3" section. We would like to know if they are present then check the next line, but we don't care if the middle section is missing altogether.  

line vty 0 1
access-class VTYIN in
exec-timeout 480

line vty 2 3
access-class VTYIN in
exec-timeout 480

line vty 3 4
access-class VTYIN in
exec-timeout 480