Add isMaster method in Db class