Added type check for @return