You could also force the code to get a NULL if there isn't any match on status=1 or status=2, if you need that:
SELECT IF( x.s1 = '2099-12-31', NULL, x.s1 ) AS minStatus1,
IF( x.s2 = '1900-1-1', NULL, x.s2 ) AS maxStatus2
SELECT MIN( IF(status=1,online,'2099-12-31') ) AS s1,
MAX( IF(status=2,online,'1900-1-1') ) AS s2
) AS x
But if you know there is at least one good value for status=1 and one good value for status=2 then don't bother with that.