Added check to ensure a frame is decoded before attempt to convert it