If result is not false

  if ( ($MyVariable = MyFunctioName($Something)) !== False )
  {
  }

Note – make sure you surround the assignment and function call in brackets or it doesn’t work!