fix indentation
fix indentation (2)
remove redundant invalid user checks; return an empty array instead of null on error