We have functions in helpers module to deal with OS detection. consider using them instead of raw checks.