Ensured missing callback does not result in error

Added a check for null callback in the rename function.