export function getBoolFromString(str) { // Catch edge cases if (str === null || str === undefined) { return false; } if (typeof str === "boolean") { return str; } if (typeof str !== "string") { return false; } // string logic const toLower = str?.toLowerCase(); return toLower === "true"; }