added boolean tests for functions/libraries

Now you can test for missing functions and libraries without isinstance
or exception handling.