Fix _local checks - introduce isLocalId into utils

Edit all adapters to use isLocalId