LPS-44515 Create new util methods to avoid duplicate logic
LPS-44515 Fix compilation and keep behaviour