check regex match before access in flickr module