If ```$reference_tags```is null as well we could just return ```tags_in_file```and avoid the rest of the code