Optimize _lp_sr, _lp_sl, _lp_sb

Simplifiy expressions in `_lp_sr`, `_lp_sl`, `_lp_sb`.
Fix usage of `[[ ! -z ...]]` by replacing it with `[[ -n ... ]]`.