Simplify type detectors

Change-Id: Ic731c1c4c76d8d6779868d7e3e4c02cb3cadc844
Reviewed-on: https://gerrit.libreoffice.org/9222
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Tested-by: Maxim Monastirsky <momonasmon@gmail.com>