How to make a function's "username already used " in ionic 3 with angular 2 & firebase

Hello everybody, I am still a beginner in ionic, particularly angular 2 and firebase. Some days I have trouble. I.e. How do I create a function "username already used " with angular 2 & firebase "? Please help. I really need this.

This tutorial might hold the answer