How to check if this page is user Profile Page
Anywhere in code, you can use code like that:

if (    arg(0) == 'user' // test if you are on user page
    and is_numeric(arg(1)) // and if user ID was provided and is possibly valid (a number)
    and arg(2) == FALSE // and there is no /edit or /delete added
) {
  // Do something
}


Substitute 'user' with any name provided by module, if you are using alternative user profile module.