Just use NULLIF:
NULLIF
SELECT id, SUBSTRING_INDEX(NULLIF(SUBSTRING_INDEX(field, 'QF=', -1), field), 'RF=', 1) AS gscore FROM tablename