add mapFailable to handle mapping with error handling