Helper functions to recognize extensions